<?php

namespace Content;

/**
 * 数据层
 */
class ContentDAOModel extends \DAO\DAOBase
{
    const STATUS_TRASH = 3;

    /**
     * 状态配置
     *
     * @var array
     */
    public $statusConfig = [
        "1" => array("name" => "正常"),
        "2" => array("name" => "隐藏"),
        "3" => array("name" => "回收站"),
    ];

    /**
     * 构造方法
     * CategoryDAOModel constructor.
     */
    public function __construct()
    {
        $this->mysqlDAO = ContentMysqlModel::getInstance();
    }

    /**
     * 类实例
     *
     * @var \Category\CategoryDAOModel
     */
    private static $_instance = null;

    /**
     * 获取类实例
     *
     * @return \Category\CategoryDAOModel
     */
    public static function getInstance()
    {
        if (!(self::$_instance instanceof self)) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }
}
